<template>
	<view v-show="isShow">
		<view class="c-popup" @touchmove.stop.prevent="touchMoz" @click="setMoz(false)"></view>
		<view><slot></slot></view>
	</view>
</template>

<script>
export default {
	name: 'c-popup',
	props: {
		isShow: {
			type: [String, Boolean, Number],
			default: false
		}
	},
	data() {
		return {};
	},
	methods: {
		touchMoz() {},
		setMoz(value) {
			this.$emit('change', value);
		}
	}
};
</script>

<style lang="scss" scoped>
.c-popup {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.5);
	// backdrop-filter: blur(5rpx); // 背景模糊
	// -webkit-backdrop-filter: blur(6rpx);
	z-index: 20;
}
</style>
